/**
 * 
 */
package com.gragra.wilsHandler;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author Christoph Teichmann
 * created Oct 26, 2013 6:29:24 PM
 * @version 0.1
 */
public class CountSingleRoot
{
	/**
	 *
	 * @param args
	 */
	public static void main(String[] args) throws IOException
	{
		BufferedReader br = new BufferedReader(new FileReader(args[0]));
		String line;
		int sentences = 0;
		int singleRoot = 0;
		int multiRoot = 0;
		while((line = br.readLine()) != null)
		{
			line = br.readLine();
			++sentences;
			int roots = 0;
			String[] parts = line.split("\\s+");
			for (String part : parts)
			{
				if(part.equals("0"))
				{++roots;}
			}
			if(roots == 1)
			{++singleRoot;}
			else if(roots > 1)
			{++multiRoot;}
			else
			{System.out.println(line);}
		}
		br.close();
		System.out.println("Sentences");
		System.out.println(sentences);
		System.out.println("Single Root");
		System.out.println(singleRoot);
		System.out.println("Multi Root");
		System.out.println(multiRoot);	
	}
}